# 冰激凌小店
# 编写一个名为IceCreamStand 的类， 让它继承为完成练习9-1或练习9-4而编写的Restaurant 类。
# 添加一个名为flavors 的属性，用于存储一个由各种口味的 冰激凌组成的列表。编写一个显示这些冰激凌的方法。创建一个IceCreamStand 实例，并调用 这个方法。

class Restaurant:
    def __init__(self, restaurant_name, cuisine_type):
        self.restaurant_name = restaurant_name
        self.cuisine_type = cuisine_type

    def describe_restaurant(self):
        print(f"Restaurant's name is {self.restaurant_name}.")
        print(f"Restaurant's cuisine_type is {self.cuisine_type}.")

    def open_restaurant(self):
        print(f"{self.restaurant_name} is opening.")


class IceCreamStand(Restaurant):

    def __init__(self, restaurant_name, cuisine_type, flavors):
        super().__init__(restaurant_name, cuisine_type)
        self.flavors = flavors

    def describe_icecreams(self):
        for flavor in self.flavors:
            print(f"{flavor} icecream is delicious.")


my_icecreamstand = IceCreamStand("gaoshi", None,
                                 ["yogurt", "banana", "chocolate"])
my_icecreamstand.describe_restaurant()
my_icecreamstand.open_restaurant()
my_icecreamstand.describe_icecreams()
